<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="webkit|ie=edge">
    <title>Exp-Inlet-Gateway</title>
    <link rel="stylesheet" href="/static/style/main.css">
    <link rel="stylesheet" href="/static/framework/bootstrap.min.css">
    <script src="/static/framework/jquery.min.js"></script>
    <script src="/static/framework/bootstrap.bundle.min.js"></script>
</head>
<#--  以下JS文件必须在JQuery加载完才能加载  -->
<script src="/static/script/main.js"></script>
<script src="/static/script/updateApi.js"></script>
<#--  以下JS文件必须在JQuery加载完才能加载  -->
<body class="container" style="font-size: 16px;min-width: 1250px">
<nav class="navbar navbar-expand-lg navbar-light container-fluid">
    <div class="container-fluid  bg-light">
        <a href="/static/application" class="navbar-brand text-start"
           style="font-family: 微软雅黑,serif; color: #3030ff; font-size: 24px;">Exp-Inlet</a>
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavAltMarkup"
                aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" aria-label="breadcrumb"
             style="line-height: 1px; text-align: center;align-items: center;">
            <ol class="breadcrumb" style="margin-bottom: 0;">
                <#--                <li class="breadcrumb-item"><a href="#">Exp-Inlet</a></li>-->
                <li class="breadcrumb-item active" aria-current="page"><a href="/static/application">应用列表</a></li>
                <li class="breadcrumb-item active" aria-current="page"><a
                            href="/static/api/list/<#if context.api?? >${context.api.appName}<#else >${context.appName}</#if>">接口列表</a>
                </li>
                <li class="breadcrumb-item active" aria-current="page"><a href="javascript:history.go(-1);">接口详情</a>
                </li>
                <li class="breadcrumb-item disabled" aria-current="page"><a href="#">修改接口</a></li>
                <li class="breadcrumb-item active" aria-current="page"><a href="/static/SysInfos.html">运行状态</a></li>
            </ol>
        </div>
        <form class="d-flex">

            <input class="form-control me-2" style="height: 32px;" type="search" placeholder="Search"
                   aria-label="Search">
            <button class="btn btn-outline-success" style="width: 80px" type="submit" onclick="$.loginOut()"><a class=""
                                                                                                                href="javascript:;"><span>退出</span></a>
            </button>
        </form>
    </div>
</nav>
<input type="hidden" id="appName" value="<#if context.api?? >${context.api.appName}<#else >${context.appName}</#if>">
<input type="hidden" id="apiCreateTime"
       value="<#if context.api?? >${context.api.apiCreateTime!}<#else >${context.apiCreateTime}</#if>">
<div class="container">
    <div class="rightP">
        <div id="apiList" class="cont ">
            <!-- 创建API -->
            <div id="apiListModal" cur='1'>
                <ul class="console-clearfix">
                    <li class="console-guidebar-default guidebar-current cApiNav cApiNav1">基本信息</li>

                    <li class="console-guidebar-default cApiNav cApiNav2">定义API请求</li>

                    <li class="console-guidebar-default cApiNav cApiNav3">定义API后端服务</li>

                    <li class="console-guidebar-default cApiNav cApiNav4">定义返回结果</li>

                </ul>
                <!-- 头部 -->

                <div class="createAppPage">
                    <!-- 1.25 S! -->
                    <div class="modal " id="senateEdit" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
                        <div class="modal-dialog" role="document">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" onclick='modalClose(this)'
                                            aria-label="Close">
                                        <span aria-hidden="true">&times;</span>
                                    </button>
                                    <h4 class="modal-title" style="text-align:left;" id="exampleModalLabel">
                                        编辑更多</h4>
                                </div>

                                <div console-scope="contentScope" class="ng-scope console-dialog-body-container">

                                    <div class="console-form console-mb2 ng-scope">

                                        <div class="console-form-row senateType">
                                            <div class="console-form-header ng-binding">类型</div>
                                            <div class="console-form-body">
                                                <div class="console-form-tip-inline ng-binding senateTit">String</div>
                                            </div>
                                        </div>

                                        <div class="console-form-row senateMaxlength">
                                            <div class="console-form-header ng-binding">最大长度</div>
                                            <div class="console-form-body">
                                                <input type="number"
                                                       class="console-textbox console-width-2 ng-pristine ng-valid ng-valid-number senateMaxlen">
                                            </div>
                                        </div>

                                        <div class="console-form-row  senateEnum">
                                            <div class="console-form-header ng-binding">枚举</div>
                                            <div class="console-form-body">
                                                <input type="text" style="width: 74.5% !important;"
                                                       class="console-textbox console-width-12 ng-pristine ng-valid"
                                                       placeholder="用逗号(,)隔开">
                                            </div>
                                        </div>

                                        <div class="console-form-row  ng-hide  senateMinv">
                                            <div class="console-form-header ng-binding">最小值</div>
                                            <div class="console-form-body">
                                                <input class="console-textbox console-width-3 ng-pristine ng-valid ng-valid-number">
                                            </div>
                                        </div>

                                        <div class="console-form-row ng-hide senateMaxv">
                                            <div class="console-form-header ng-binding">最大值</div>
                                            <div class="console-form-body">
                                                <input class="console-textbox console-width-3 ng-pristine ng-valid ng-valid-number">
                                            </div>
                                        </div>


                                        <div class="console-form-row senateVify">
                                            <div class="console-form-header ng-binding ">参数验证</div>
                                            <div class="console-form-body">
                                                    <textarea style="width:74.5% !important;"
                                                              placeholder="输入正则表达式"
                                                              class="console-textarea console-width-12 ng-pristine ng-valid"
                                                              rows="4"></textarea>
                                            </div>
                                        </div>
                                    </div>


                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" onclick='modalClose(this)'
                                            data-dismiss="modal">关闭
                                    </button>
                                    <button type="button" class="btn btn-success senateEnter">确定</button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- 1.25 E! -->
                    <#include "./step/api_base.ftl">
                    <#include "./step/api_request.ftl">
                    <#include "./step/api_foword.ftl">
                    <#include "./step/api_return.ftl">
                </div>


                <div class="console-panel-body console-p4 console-mt4 mt-4 mb-4">
                    <div class="console-form">
                        <div class="console-form-row">
                            <div class="console-form-body">
                                    <span class="console-button-wrap ng-isolate-scope">
                                        <a class="console-button console-button-default console-button-medium hide cp-lPage">
                                            <span ng-transclude="">
                                                <span class="ng-scope ng-binding">上一步</span>
                                            </span>
                                        </a>
                                    </span>
                                <span class="console-ml2 console-button-wrap ng-isolate-scope" theme="blue">
                                        <a class="console-button console-button-blue console-button-medium cp-nPage">
                                            <span ng-transclude="">
                                                <span class="ng-scope ng-binding">下一步</span>
                                            </span>
                                        </a>
                                    </span>
                                <span class="console-ml2 console-button-wrap ng-isolate-scope " theme="blue"
                                      onclick="saveApi()">
                                        <a class="console-button console-button-blue console-button-medium console-button-disabled hide cp-sPage">
                                            <span>
                                                <span class="ng-scope ng-binding">保存</span>
                                            </span>
                                        </a>
                                    </span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- apiListModal End -->
    </div>
    <!-- rightP End -->
</div>
</body>
<script>
    $(function () {
        // 初始化
        init();
        apiInfo.url = <#if context??>"/static/api/update"
        <#else >"/static/api/add"</#if>;
        apiInfo.action = <#if context??>"UPDATE"
        <#else >"ADD"</#if>;
        apiInfo.appName = "<#if context.api?? >${context.api.appName}<#else >${context.appName}</#if>";
        apiInfo.apiCreateTime = "<#if context.api?? >${context.api.apiCreateTime!}<#else >${context.apiCreateTime}</#if>";
    });
</script>
</html>